package com.webapp.org.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.webapp.org.bean.DesignationBean;
import com.webapp.org.dao.DesignationDAO;
import com.webapp.org.interfaces.IDesgination;

@Service("designationservice")
public class DesignationService implements IDesgination
{  //private DesignationDAO designationDAO us

	@Override
	public boolean insertDesignation(DesignationBean designationBean)
	{
	   DesignationDAO designationDAO = new DesignationDAO();
	   boolean result = designationDAO.insertDesignation(designationBean);
	   return result;
	}

	@Override
	public boolean updateDesignation(DesignationBean designationBean)
	{
		DesignationDAO designationDAO = new DesignationDAO();
		boolean result = designationDAO.updateDesignation(designationBean);
		return result;
	}

	@Override
	public boolean deleteDesignation(int designationId)
	{
		DesignationDAO designationDAO = new DesignationDAO();
		boolean result = designationDAO.deleteDesignation(designationId);
		return result;	
	}

	@Override
	public List<DesignationBean> retrieveDesignation()
	{
		DesignationDAO designationDAO = new DesignationDAO();
		List<DesignationBean> result = designationDAO.retrieveDesignation();
		   return result;
	}

	@Override
	public DesignationBean getDesignation(int designationId)
	{
		// TODO Auto-generated method stub
		return null;
	}

}
